import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/login/Login'), // 登录
    meta: { title: '登录' }
  },
  {
    path: '/user',
    name: 'User',
    component: () => import('@/views/user/User'), // 个人中心
    meta: { title: '个人中心' }
  },
  {
    path: '/TaskSend',
    name: 'TaskSend',
    component: () => import('@/views/task/TaskSend'), // 任务发布
    meta: { title: '任务发布' }
  },
  {
    path: '/record',
    name: 'Record',
    component: () => import('@/views/record/RecordSend'), // 日志填写
    meta: { title: '日志填写' }
  },
  {
    path: '/Task',
    name: 'Task',
    component: () => import('@/views/task/Task'), // 我的任务
    meta: { title: '我的任务' }
  },
  {
    path: '/myTask',
    name: 'MyTask',
    component: () => import('@/views/task/MyTask'), // 当前任务
    meta: { title: '当前任务' }
  },
  {
    path: '/pastTask',
    name: 'PastTask',
    component: () => import('@/views/task/PastTask'), // 历史任务
    meta: { title: '历史任务' }
  },
  {
    path: '/myRecord',
    name: 'MyRecord',
    component: () => import('@/views/record/MyRecord'), // 我的日志
    meta: { title: '我的日志' }
  },
  {
    path: '/taskAssign',
    name: 'TaskAssign',
    component: () => import('@/views/task/TaskAssign'), // 未分配
    meta: { title: '未分配' }
  },
  {
    path: '/taskDetail',
    name: 'TaskDetail',
    component: () => import('@/views/task/TaskDetail'), // 任务详情
    meta: { title: '任务详情' }
  },
  {
    path: '/recordDetail',
    name: 'RecordDetail',
    component: () => import('@/views/record/RecordDetail'), // 日志详情
    meta: { title: '日志详情' }
  },
  {
    path: '/Examine',
    name: 'Examine',
    component: () => import('@/views/examine/Examine'), // 费用审批
    meta: { title: '费用审批' }
  },
  {
    path: '/CostTask',
    name: 'CostTask',
    component: () => import('@/views/examine/CostTask'), // 未提交费用
    meta: { title: '未提交费用' }
  },
  {
    path: '/ExamineTask',
    name: 'ExamineTask',
    component: () => import('@/views/examine/ExamineTask'), // 审核费用
    meta: { title: '审核费用' }
  },
  {
    path: '/ExamineBack',
    name: 'ExamineBack',
    component: () => import('@/views/examine/ExamineBack'), // 审核退回费用
    meta: { title: '审核退回费用' }
  },
  {
    path: '/ExaminePass',
    name: 'ExaminePass',
    component: () => import('@/views/examine/ExaminePass'), // 审核通过费用
    meta: { title: '审核通过费用' }
  },
  {
    path: '/ExamineDetail',
    name: 'ExamineDetail',
    component: () => import('@/views/examine/ExamineDetail'), // 费用审核列表
    meta: { title: '费用审核列表' }
  },
  {
    path: '/CostDetail',
    name: 'CostDetail',
    component: () => import('@/views/examine/CostDetail'), // 费用详情
    meta: { title: '费用详情' }
  },
  {
    path: '/Leave',
    name: 'Leave',
    component: () => import('@/views/leave/Leave'), // 请假审核
    meta: { title: '请假审批' }
  },
  {
    path: '/MyLeave',
    name: 'MyLeave',
    component: () => import('@/views/leave/MyLeave'), // 我的请假
    meta: { title: '我的请假' }
  },
  {
    path: '/LeavePass',
    name: 'LeavePass',
    component: () => import('@/views/leave/LeavePass'), // 已审批请假
    meta: { title: '已审批请假' }
  },
  {
    path: '/LeaTask',
    name: 'LeaTask',
    component: () => import('@/views/leave/LeaTask'), // 未审批请假
    meta: { title: '未审批请假' }
  },
  {
    path: '/LeaDetail',
    name: 'LeaDetail',
    component: () => import('@/views/leave/LeaDetail'), // 请假详情
    meta: { title: '请假详情' }
  },
  {
    path: '/Performance',
    name: 'Performance',
    component: () => import('@/views/Performance/Performance'), // 绩效考核
    meta: { title: '绩效考核' }
  },
  {
    path: '/PerformanceAppraisal',
    name: 'PerformanceAppraisal',
    component: () => import('@/views/Performance/PerformanceAppraisal'), // 新建绩效考核
    meta: { title: '新建绩效考核' }
  },
  {
    path: '/PerformanceTask',
    name: 'PerformanceTask',
    component: () => import('@/views/Performance/PerformanceTask'), // 已提交绩效考核
    meta: { title: '已提交绩效考核' }
  },
  {
    path: '/PerformanceApprove',
    name: 'PerformanceApprove',
    component: () => import('@/views/Performance/PerformanceApprove'), // 待审批绩效考核
    meta: { title: '待审批绩效考核' }
  },
  {
    path: '/PerformancePass',
    name: 'PerformancePass',
    component: () => import('@/views/Performance/PerformancePass'), // 已通过绩效考核
    meta: { title: '已通过绩效考核' }
  },
  {
    path: '/performanceDetail',
    name: 'performanceDetail',
    component: () => import('@/views/Performance/performanceDetail'), // 绩效考核详情
    meta: { title: '绩效考核详情' }
  },
  {
    path: '/Presentation',
    name: 'Presentation',
    component: () => import('@/views/presentation/Presentation'), // 数据展示
    meta: { title: '数据展示' }
  },
  {
    path: '/TaskDo',
    name: 'TaskDo',
    component: () => import('@/views/presentation/TaskDo'), // 今日待办
    meta: { title: '今日待办' }
  },
  {
    path: '/TaskToDetail',
    name: 'TaskToDetail',
    component: () => import('@/views/presentation/TaskToDetail'), // 任务详情
    meta: { title: '任务详情' }
  },
  {
    path: '/TaskWeek',
    name: 'TaskWeek',
    component: () => import('@/views/presentation/TaskWeek'), // 本周任务
    meta: { title: '本周任务' }
  },
  {
    path: '/Personnel',
    name: 'Personnel',
    component: () => import('@/views/presentation/Personnel'), // 本人人员
    meta: { title: '本周人员' }
  }

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  linkExactActiveClass: 'active',
  routes
})

export default router
